'use strict';
/**
 * model
 */
import pagination from 'think-pagination';//引入分页插件

export default class extends think.model.base {

    //统计留言总数
    total(where) {
        let total = this.model('guestbook').where(where).count();
        return total;
    }

    //guest book data list
    dataList(where, page = 1,limit = 10,order = 'ordernum desc,id desc') {
        //let total = await this.total();
        let dataList = this.model('guestbook').where(where).page(page, limit).order(order).countSelect();
        
        return dataList;
    }
}